var SPI={}
SPI.begin = function(device){
    var d = device==undefined?getDevice(0):device
    sendCommand("id=010&SPI.begin=0",d)
}
SPI.setBitOrder = function(what,device){
    var d = device==undefined?getDevice(0):device
    sendCommand("id=011&SPI.setBitOrder="+what,d)
}
SPI.setClockDivider = function(what,device){
    var d = device==undefined?getDevice(0):device
    sendCommand("id=012&SPI.setClockDivider="+what,d)
}
SPI.transfer = function(what,device){
    var d = device==undefined?getDevice(0):device
    sendCommand("id=013&SPI.transfer="+what,d)
}